package com.Maykk.Demo06;

import java.util.Calendar;

/**
 * @ClassName Demo01
 * @Description: TODO Calendar 练习
 * @Author: MaykkSTAR@163.com
 * @DATE: 2023/4/26
 */
public class Demo01 {
    public static void main(String[] args) {
        Calendar cal = Calendar.getInstance();
//        System.out.println(cal); // 输出大长串的信息都是时间相关的
        System.out.println(cal.get(Calendar.YEAR));
        System.out.println(cal.get(Calendar.MONTH)); // 从 0 开始数
        System.out.println(cal.get(Calendar.DATE));
        System.out.println(cal.get(Calendar.WEEK_OF_MONTH)); // 从周日开始数
    }
}
